/*
 * @Author: Swance
 * @Date: 2024-1-2
 * @Description: 常量文件
 */
export const classicColorOption = [
  {
    id: 'black',
    backgroundColor: 'rgba(0, 0, 0, 1)',
    borderColor: 'rgba(0, 0, 0, 1)',
    pencilColor: 'rgba(0, 0, 0, 1)',
    textColorBorder: 'rgba(0, 0, 0, 1)',
    textColor: 'rgba(0, 0, 0, 1)',
  },
  {
    id: 'red',
    backgroundColor: 'rgba(231, 94, 91, 1)',
    borderColor: 'rgba(255, 87, 84, 1)',
    pencilColor: 'rgba(231, 94, 91, 1)',
    markerColor: 'rgba(226, 152, 147, 0.6)',
    textColorBorder: 'rgba(252, 47, 51, 1)',
    textColor: 'rgba(252, 58, 62, 1)',
  },
  {
    id: 'orange',
    backgroundColor: 'rgba(252, 163, 91, 1)',
    borderColor: 'rgba(255, 156, 86, 1)',
    pencilColor: 'rgba(252, 163, 91, 1)',
    markerColor: 'rgba(240, 182, 149, 0.6)',
    textColorBorder: 'rgba(252, 116, 48, 1)',
    textColor: 'rgba(253, 131, 66, 1)',
  },
  {
    id: 'yellow',
    backgroundColor: 'rgba(242, 250, 18, 1)',
    borderColor: 'rgba(246, 255, 0, 1)',
    pencilColor: 'rgba(242, 250, 18, 1)',
    markerColor: 'rgba(248, 231, 165, 0.6)',
    textColorBorder: 'rgba(250, 207, 47, 1)',
    textColor: 'rgba(255, 218, 85, 1)',
  },
  {
    id: 'cyan',
    backgroundColor: 'rgba(145, 255, 71, 1)',
    borderColor: 'rgba(134, 255, 61, 1)',
    pencilColor: 'rgba(145, 255, 71, 1)',
    markerColor: 'rgba(203, 233, 177, 0.6)',
    textColorBorder: 'rgba(146, 245, 83, 1)',
    textColor: 'rgba(159, 223, 116, 1)',
  },
  {
    id: 'green',
    backgroundColor: 'rgba(90, 183, 175, 1)',
    borderColor: 'rgba(73, 175, 167, 1)',
    pencilColor: 'rgba(90, 183, 175, 1)',
    markerColor: 'rgba(169, 227, 210, 0.6)',
    textColorBorder: 'rgba(37, 239, 194, 1)',
    textColor: 'rgba(64, 215, 183, 1)',
  },
  {
    id: 'skyblue',
    backgroundColor: 'rgba(112, 212, 255, 1)',
    borderColor: 'rgba(105, 199, 246, 1)',
    pencilColor: 'rgba(112, 212, 255, 1)',
    markerColor: 'rgba(143, 221, 253, 0.6)',
    textColorBorder: 'rgba(50, 157, 248, 1)',
    textColor: 'rgba(88, 177, 252, 1)',
  },
  {
    id: 'blue',
    backgroundColor: 'rgba(87, 134, 237, 1)',
    borderColor: 'rgba(74, 122, 222, 1)',
    pencilColor: 'rgba(87, 134, 237, 1)',
    markerColor: 'rgba(151, 180, 242, 0.6)',
    textColorBorder: 'rgba(35, 115, 245, 1)',
    textColor: 'rgba(67, 134, 245, 1)',
  },
  {
    id: 'purple',
    backgroundColor: 'rgba(174, 83, 190, 1)',
    borderColor: 'rgba(170, 69, 189, 1)',
    pencilColor: 'rgba(174, 83, 190, 1)',
    markerColor: 'rgba(203, 150, 214, 0.6)',
    textColorBorder: 'rgba(206, 79, 245, 1)',
    textColor: 'rgba(220, 115, 252, 1)',
  },
  {
    id: 'deepPurple',
    textColorBorder: 'rgba(140, 35, 158, 1)',
    textColor: 'rgba(156, 39, 176, 1)',
  },
  {
    id: 'white',
    backgroundColor: 'rgba(255, 255, 255, 1)',
    textColorBorder: 'rgba(206, 206, 206, .5)',
    borderColor: 'rgba(206, 206, 206, .5)',
    pencilColor: 'rgba(255, 255, 255, 1)',
    textColor: 'rgba(255, 255, 255, 1)',
  },
  {
    id: 'blueGrey',
    textColorBorder: 'rgba(165, 182, 200, 1)',
    textColor: 'rgba(184, 203, 223, 1)',
  },
];

// 字体——珊瑚色系
export const coralColor = [
  {
    id: 'coral1',
    textColorBorder: 'rgba(207, 84, 82, 1)',
    textColor: 'rgba(231, 94, 91, 1)',
  },
  {
    id: 'coral2',
    textColorBorder: 'rgba(207, 128, 66, 1)',
    textColor: 'rgba(231, 143, 73, 1)',
  },
  {
    id: 'coral3',
    textColorBorder: 'rgba(216, 164, 67, 1)',
    textColor: 'rgba(240, 183, 75, 1)',
  },
  {
    id: 'coral4',
    textColorBorder: 'rgba(128, 165, 82, 1)',
    textColor: 'rgba(142, 184, 91, 1)',
  },
  {
    id: 'coral5',
    textColorBorder: 'rgba(81, 164, 157, 1)',
    textColor: 'rgba(90, 183, 175, 1)',
  },
  {
    id: 'coral6',
    textColorBorder: 'rgba(74, 153, 214, 1)',
    textColor: 'rgba(82, 170, 238, 1)',
  },
  {
    id: 'coral7',
    textColorBorder: 'rgba(56, 114, 172, 1)',
    textColor: 'rgba(62, 127, 191, 1)',
  },
  {
    id: 'coral8',
    textColorBorder: 'rgba(63, 85, 168, 1)',
    textColor: 'rgba(70, 95, 188, 1)',
  },
  {
    id: 'coral9',
    textColorBorder: 'rgba(99, 69, 171, 1)',
    textColor: 'rgba(110, 77, 190, 1)',
  },
  {
    id: 'coral10',
    textColorBorder: 'rgba(155, 75, 170, 1)',
    textColor: 'rgba(174, 83, 190, 1)',
  },
  {
    id: 'coral11',
    textColorBorder: 'rgba(181, 75, 138, 1)',
    textColor: 'rgba(202, 84, 154, 1)',
  },
  {
    id: 'coral12',
    textColorBorder: 'rgba(206, 86, 94, 1)',
    textColor: 'rgba(229, 96, 105, 1)',
  },
];

// 字体——雪山色系
export const snowColor = [
  {
    id: 'snow1',
    textColorBorder: 'rgba(206, 206, 206, 1)',
    textColor: 'rgba(229, 229, 229, 1)',
  },
  {
    id: 'snow2',
    textColorBorder: 'rgba(168, 207, 217, 1)',
    textColor: 'rgba(187, 230, 242, 1)',
  },
  {
    id: 'snow3',
    textColorBorder: 'rgba(147, 199, 213, 1)',
    textColor: 'rgba(164, 222, 237, 1)',
  },
  {
    id: 'snow4',
    textColorBorder: 'rgba(103, 180, 202, 1)',
    textColor: 'rgba(115, 200, 225, 1)',
  },
  {
    id: 'snow5',
    textColorBorder: 'rgba(169, 182, 198, 1)',
    textColor: 'rgba(188, 203, 221, 1)',
  },
  {
    id: 'snow6',
    textColorBorder: 'rgba(77, 160, 190, 1)',
    textColor: 'rgba(86, 178, 212, 1)',
  },
  {
    id: 'snow7',
    textColorBorder: 'rgba(63, 133, 174, 1)',
    textColor: 'rgba(70, 148, 194, 1)',
  },
  {
    id: 'snow8',
    textColorBorder: 'rgba(49, 106, 159, 1)',
    textColor: 'rgba(55, 118, 177, 1)',
  },
  {
    id: 'snow9',
    textColorBorder: 'rgba(29, 33, 41, 1)',
    textColor: 'rgba(29, 33, 41, 1)',
  },
  {
    id: 'snow10',
    textColorBorder: 'rgba(26, 62, 133, 1)',
    textColor: 'rgba(26, 62, 133, 1)',
  },
  {
    id: 'snow11',
    textColorBorder: 'rgba(3, 4, 94, 1)',
    textColor: 'rgba(3, 4, 94, 1)',
  },
];

// 字体类型 常量
export const textFamilyList = [
  {
    id: 1,
    typeName: '思源黑体',
  },
  {
    id: 2,
    typeName: '简写宋体',
  },
  {
    id: 3,
    typeName: '硬笔楷书',
  },
  {
    id: 4,
    typeName: '可爱乐淘体',
  },
];

// 行高 常量
export const lineHeightList = [1.0, 1.2, 1.5, 2.0, 2.5, 3.0];

// 画布元素JSON输出格式
export const JsonOption = [
  'id',
  'type',
  'myType',
  'lock',
  'erasable',
  'lockMovementX',
  'lockMovementY',
  'hasControls',
  'dirty',
  'zoomX',
  'zoomY',
];

// 团队角色 枚举
export enum teamRole {
  Owner, // 团队拥有者
  Member, // 团队成员
}

// 白板权限角色 枚举
export enum boardRole {
  Owner, // 白板拥有者
  Editor, // 白板编辑者
  Viewer, // 白板浏览者
}

// 白板同步 自定义事件
export enum BoardSyncEvent {
  // Action 类型
  ADD = 'add',
  REMOVE = 'remove',
  UPDATE = 'update',
  UP = 'up',
  DOWN = 'down',

  // 接收服务器消息类型
  type0 = 'InitData', // 画布的初始数据，只会在建立连接时发送一次
  type1 = 'ReceiveNewAction', // 收到其他用户的新操作
  type2 = 'CollaborativeData', // 收到白板协作数据
  type3 = 'SeverAskCanvas', // 服务器找客户端要最新白板数据
  type4 = 'LockElementsByIDs', // 收到需要锁定的元素ID，用于解决操作同个元素发生的冲突
  type5 = 'UnlockElementsByIDs', // 收到需要解锁的元素ID，用于解决操作同个元素发生的冲突

  // WebSocket 连接状态码
  Connect = 'connected',
  Disconnected = 'disconnected',

  // 白板同步
  Sync = 'canvasSync',
  // 实时保存时间
  saveTime = 'saveTime',

  // 发送给 服务端 的消息类型
  NEW_ACTION = 100, // 发送新操作给服务器
  COVER = 101, // 发送新封面图给服务器
  BOARD_DATA = 102, // 发送白板数据给服务器
  OPERATE_ELEMENTS = 104, // 把当前用户正在操作的元素数据发给服务器，用于上锁
  NOT_OPERATE_ELEMENTS = 105, // 把当前用户没有操作的元素数据发给服务器，用于解锁
}
